#ifndef OVERLAYER_H
#define OVERLAYER_H

#include <QThread>
#include <QStringList>
#include <QRegExp>
#include <QDir>
#include <QDirIterator>
#include <QMap>
#include <QFileSystemModel>
#include "listviewdelegate.h"

class Overlayer : public QThread
{
    Q_OBJECT
public:
    explicit Overlayer(QObject *parent = 0);
    void setModel(QFileSystemModel * model);

signals:
    void mapReady(QMap <qint64, int>*map);
    void commandRequired(QString command);

private:
    QMap <qint64, int>*map;
    QString basePath;
    QFileSystemModel *model;
    int count;
    int changedFiles;
    bool processed;
    QTimer *timer;

public slots:
   void run();
   void processChanges(QString strStatus);
   void onTimerTimeout();
   void paintClear();
   void setBasePath(QString path);

};

#endif // OVERLAYER_H
